package First;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Login {
    public static void main(String[] args){
        JFrame jframe = new JFrame("学生管理系统") ; //window
        Dimension d = new Dimension(400,200);
        Point p = new Point (400,350);

        jframe.setSize(d);
        jframe.setLocation(p);
        jframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        //jframe.setVisible(true);

        JButton button1 = new JButton("管理员");
        JButton button2 = new JButton("学生");

        FlowLayout flow = new FlowLayout(FlowLayout.LEFT,80,50);
        JPanel panel = new JPanel(flow);
        panel.add(button1);
        panel.add(button2);
        jframe.add(panel);
        jframe.setVisible(true);

        button1.addActionListener(new ActionListener(){
            public void actionPerformed(ActionEvent e){
                Login_admin login_admin = new Login_admin();
            }
        });

        button2.addActionListener(new ActionListener(){
            public void actionPerformed(ActionEvent e){
                Login_student login_student = new Login_student();
            }
        });
    }
}
